﻿using LxBasic;

namespace LxCore
{
    public interface IParameter<T> : IField<T>
    {
        T GetPara();
    }
}
//ICellVars<T> IField<T>.GetCellVars(IIndexHost indexHost) => new ParaVars<T>(GetPara());
//IFaceVars<T> IField<T>.GetFaceVars(IIndexHost indexHost) => new ParaVars<T>(GetPara());
//bool IField<T>.IsParameter(out T value)
//{
//    value = GetPara();
//    return true;
//}
//bool IField<T>.IsEqual0()
//{
//    T p = GetPara();
//    switch (p)
//    {
//        case double d: return d == 0;
//        case Vector3d v: return v == Vector3d.Zero;
//        default: return false;
//    }
//}
//protected class ParaVars<T2> : ICellVars<T2>, IFaceVars<T2>
//{
//    public ParaVars(T2 para)
//    {
//        this.Para = para;
//    }
//    public T2 Para;
//    public T2 GetCellVar(int cellID) => Para;
//    public T2 GetFaceVar(int faceID) => Para;
//}